// 
// ampcontroller 
//
// 
// Developed with [embedXcode](http://embedXcode.weebly.com)
// 
// Author	 	IzaOlivier
// 				Maestun Abidjan
//
// Date			19/01/14 12:20
// Version		<#version#>
// 
// Copyright	© IzaOlivier, 2014
// License		<#license#>
//
// See			ReadMe.txt for references
//


#define __AMP
//#define __CONTROLLER


// Core library for code-sense
#if defined(ARDUINO) && (ARDUINO >= 100) // Arduino 1.0 and 1.5 specific
#include "Arduino.h"
#elif defined(ARDUINO) && (ARDUINO < 100) // Arduino 23 specific
#include "WProgram.h"
#else // error
#error Platform not defined
#endif

// Include application, user and local libraries
#if defined(__AMP)
#include "amp.h"
#endif

// Define variables and constants
//
// Brief	Name of the LED
// Details	Each board has a LED but connected to a different pin
//
uint8_t myLED;


//
// Brief	Setup
// Details	Define the pin the LED is connected to
//
// Add setup code 
void setup() {
    
    Serial.begin(9600);
    
#if defined(__AMP)
    Serial.println("setting up amp");
    setup_amp();
#elif defined(__CONTROLLER)
    setup_controller();
#else
  // myLED pin number
    Serial.println("setup");
    myLED = 13;
    pinMode(myLED, OUTPUT);
#endif
    
    
    
    
}

//
// Brief	Loop
// Details	Blink the LED
//
// Add loop code 
void loop() {
#if defined(__AMP)
    loop_amp();
#elif defined(__CONTROLLER)
    loop_controller();
#else
    Serial.println("loop");
    digitalWrite(myLED, HIGH);
    delay(1000);
    digitalWrite(myLED, LOW);
    delay(500);
    
#endif
}
